def generate_custom_id():
    while True:
        user_input = input("Enter a custom ID (positive integer): ")
        try:
            val = int(user_input)
            if val > 0:
                return val
            else:
                print("ID must be a positive integer.")
        except ValueError:
            print("Invalid input. Please enter a positive integer.")

if __name__ == "__main__":
    print("Test generating custom id...")
    custom_id = generate_custom_id()
    print(f"Custom ID entered: {custom_id}")